<?php


namespace app;


use think\Paginator;

class Query  extends \think\db\Query
{

    final public function paginate($listRows = null, $simple = false): Paginator
    {
        $config = [
            'page' => request()->param('page',1),
            'list_rows' =>request()->param('list_rows',15),
        ];
        if (is_array($listRows) && !empty($listRows)){
            $config = array_merge($config,$listRows);
        }
        return parent::paginate($config, $simple);
    }


}